package com.yehui;

import com.yehui.aop.HelloService;
import com.yehui.config.AopConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.annotation.PostConstruct;

public class AppMain {
	@PostConstruct
    public static void main(String[] args) {
//        AnnotationConfigApplicationContext context =
//                new AnnotationConfigApplicationContext(Myconfig.class);
//        Hello hello = context.getBean(Hello.class);
//        System.out.println(hello);
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(AopConfig.class);
        HelloService helloService = context.getBean(HelloService.class);
        helloService.sayHello("43253");
    }
}
